//
//  BVServicePhoneButCell.m
//  BuyVegetable
//
//  Created by zhuzi on 16/10/14.
//  Copyright © 2016年 com.yinding. All rights reserved.
//

#import "BVServicePhoneButCell.h"

@implementation BVServicePhoneButCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _phoneButton = [UIButton buttonWithType:UIButtonTypeSystem];
        [_phoneButton setImage:[[UIImage imageNamed:@"order_detail_phone"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
        [self.contentView addSubview:_phoneButton];
        _phoneButton.sd_layout.topSpaceToView(self.contentView,5).rightSpaceToView(self.contentView,10).bottomSpaceToView(self.contentView,5).widthIs(30);
        
        _lineView = [[UIView alloc]init];
        _lineView.backgroundColor = [UIColor BVLineGrayColor];
        [self.contentView addSubview:_lineView];
        _lineView.sd_layout.topSpaceToView(self.contentView,5).bottomSpaceToView(self.contentView,5).rightSpaceToView(_phoneButton,10).widthIs(0.5);
        
        _phoneNumber = [[UILabel alloc]init];
        _phoneNumber.textColor = [UIColor BVTextGrayColor];
        _phoneNumber.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_phoneNumber];
        _phoneNumber.sd_layout.topSpaceToView(self.contentView,0).leftSpaceToView(self.contentView,10).rightSpaceToView(_phoneButton,0).bottomSpaceToView(self.contentView,0);
        }
    return self;
}
@end
